package com.itheima.service;

import com.itheima.domain.Classes;
import com.itheima.mapper.ClassesMapper;
import com.itheima.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

public class Demo {

    @Test
    public void findAll(){
        SqlSession sqlSession = MybatisUtils.getSqlSession();
        ClassesMapper mapper = sqlSession.getMapper(ClassesMapper.class);

      List<Classes> list =  mapper.findAll();
        for (Classes classes : list) {
            System.out.println(classes);
        }
    }
}
